package com.qiang.domain;

import java.util.Objects;

public class Subway {
    //地铁站（地铁站编号，地铁站名称，所属路线）
    private String sid;
    private String sname;
    private String sline;

    public Subway() {
    }

    public Subway(String sid, String sname, String sline) {
        this.sid = sid;
        this.sname = sname;
        this.sline = sline;
    }

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public String getSline() {
        return sline;
    }

    public void setSline(String sline) {
        this.sline = sline;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Subway subway = (Subway) o;
        return Objects.equals(sid, subway.sid) &&
                Objects.equals(sname, subway.sname) &&
                Objects.equals(sline, subway.sline);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sid, sname, sline);
    }

    @Override
    public String toString() {
        return "Subway{" +
                "sid='" + sid + '\'' +
                ", sname='" + sname + '\'' +
                ", sline='" + sline + '\'' +
                '}';
    }
}
